cmake_minimum_required(VERSION 3.10)
project(MyP2PProject)

# 设置 C++ 标准
set(CMAKE_CXX_STANDARD 17)

# 查找 Boost 库（asio 和 uuid）
find_package(Boost REQUIRED COMPONENTS system thread uuid)

# 找到 JSON 库
find_package(nlohmann_json REQUIRED)

# 定义头文件路径
include_directories(
    /opt/homebrew/include
    ${Boost_INCLUDE_DIRS}
    ${nlohmann_json_INCLUDE_DIRS}
)

# 设置源文件
set(SOURCES
    src/main.cpp
    src/signal_server.cpp
)

# 定义执行文件
add_executable(main ${SOURCES})

# 链接 Boost 和 JSON 库
target_link_libraries(main ${Boost_LIBRARIES} nlohmann_json::nlohmann_json)
